package dishiyizhou;

import java.util.Scanner;

class Account{
	private int balance;
	
	public Account(int balance) {
		this.balance = balance;
	}

	public int getBalance() {
		return balance;
	}

	public void setBalance(int balance) {
		this.balance = balance;
	}
	synchronized void deposit(int money){
		this.balance += money;
		if (this.balance >= 0) notify();
	}
	synchronized void withdraw(int money){
		try{
			while (this.balance - money < 0)
				wait();
			this.balance -= money;
		}catch (Exception e){}

}
}

public class Main1 {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
	}
}
